package com.whmnx.main.ui.adapter;

import android.content.Context;
import android.text.Html;
import android.text.Spanned;
import android.widget.TextView;

import com.classic.adapter.BaseAdapterHelper;
import com.classic.adapter.CommonRecyclerAdapter;
import com.whmnx.base.bean.MsgBean;
import com.whmnx.main.R;

/**
 * author : huang
 * date   : 2020/10/14 0014 17:00
 * version: 1.0
 * @author Administrator
 */
public class MsgAdapter extends CommonRecyclerAdapter<MsgBean> {

    public MsgAdapter(Context context) {
        super(context, R.layout.item_msg);
    }


    @Override
    public void onUpdate(BaseAdapterHelper helper, MsgBean item, int position) {
        helper.setText(R.id.tv1,item.getMessage_Title());
        helper.setText(R.id.tv4,item.getCreateDate());
        Spanned sp = Html.fromHtml(item.getMessage_Content());
        TextView tv = helper.getView(R.id.tv3);
        tv.setText(sp);

    }
}
